package com.example.phoenixshop.bean;

import java.math.BigDecimal;
import java.util.Date;

public class Order {
    /**
     * 订单编号(数据库)
     */
    private Long id;
    /**
     * 订单号
     */
    private String orderId;
    /**
     * 商品id
     */
    private Long goodId;
    /**
     * 买家id
     */
    private Long buyerId;
    /**
     * 卖家id
     */
    private Long sellerId;
    /**
     * 单价
     */
    private BigDecimal unitPrice;
    /**
     * 购买量
     */
    private Integer purchases;
    /**
     * 总价
     */
    private BigDecimal totalPrice;
    /**
     * 地址id
     */
    private Long addressId;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;

    public Order(Long id, String orderId, Long goodId, Long buyerId, Long sellerId, BigDecimal unitPrice, Integer purchases, BigDecimal totalPrice, Long addressId, Date createTime, Date updateTime) {
        this.id = id;
        this.orderId = orderId;
        this.goodId = goodId;
        this.buyerId = buyerId;
        this.sellerId = sellerId;
        this.unitPrice = unitPrice;
        this.purchases = purchases;
        this.totalPrice = totalPrice;
        this.addressId = addressId;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Order() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    public Long getGoodId() {
        return goodId;
    }

    public void setGoodId(Long goodId) {
        this.goodId = goodId;
    }

    public Long getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Long buyerId) {
        this.buyerId = buyerId;
    }

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getPurchases() {
        return purchases;
    }

    public void setPurchases(Integer purchases) {
        this.purchases = purchases;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}